#!/usr/bin/python3
# 发布于 2021-7-1, BV1ko4y1Q7ty

import pyglet

win = pyglet.window.Window()
win.set_caption("Hello")
label = pyglet.text.Label('Hello', x=win.width / 2, y=win.height / 2, anchor_x='center')

@win.event
def on_draw():
    win.clear()
    label.draw()

pyglet.app.run()
